<?php if($historyGames){ 
    foreach ($historyGames as $vo) {
?>
<a href="javascript:;" onclick="chooseGame(this)" data-id="<?php echo $vo['id'] ?>" data-name="<?php echo $vo['name'] ?>" data-abri="<?php echo $vo['abridge'] ?>"><?php echo $vo['name'] ?></a>
<?php
        } 
    }
?>